import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询PK订单列表
export function listOrderPk(data) {
  return request({
    url: '/order/pk/orderPkList',
    method: 'post',
    data: data
  })
}

// 查询PK订单详细
export function getOrderPk(OrderNo) {
  return request({
    url: '/order/pk/' + parseStrEmpty(OrderNo),
    method: 'get'
  })
}

// 新增PK订单
export function addOrderPk(data) {
  return request({
    url: '/order/pk',
    method: 'post',
    data: data
  })
}

// 修改PK订单
export function updateOrderPk(data) {
  return request({
    url: '/order/pk',
    method: 'put',
    data: data
  })
}

// 删除PK订单
export function delOrderPk(OrderNo) {
  return request({
    url: '/order/pk/' + OrderNo,
    method: 'delete'
  })
}

// PK订单状态修改
export function changeOrderPkStatus(OrderNo, status) {
  const data = {
    OrderNo,
    status
  }
  return request({
    url: '/order/pk/orderPkChangeStatus',
    method: 'put',
    data: data
  })
}